< previous page
page_628
next page >
Page 628
Figure 17.24
Light striking a surface at an angle greater than
the critical angle is internally reflected.
For example, the X component of the vector T is:
T
x
= L
x
* n
1
/ n
2
- (Cos(
q
2
) - Cos(
q
1
) * n
1
/ n
2
) * N
x
If N and L are unit vectors, then Cos(
q
1
) = N L. To find Cos(
q
2
), you can use Snell's law, plus the fact that Sin
2
(
q
) + Cos
2
(
q
) = 1.
Sin(
q
1
) / Sin(
q
2
) = n
2
/ n
1
Sin(
q
2
) = Sin(
q
1
) * n
1
/ n
2
Sin
2
(
q
2
) = (Sin(
q
1
) * n
1
/ n
2
)
2
= Sin
2
(
q
1
) * (n
1
/ n
2
)
2
1 - Cos
2
(
q
2
) = (1 - Cos
2
(
q
1
)) * (n
1
/ n
2
)
2
Cos
2
(
q
2
) = 1 - (1 - Cos
2
(
q
1
)) * (n
1
/ n
2
)
2
Cos(
q
2
) = Sqr(1 - (1 - Cos
2
(
q
1
)) * (n
1
/ n
2
)
2
)
The following code fragment calculates the components of the vector T.
' Find the transmission vector T.
cos1 = Abs(NdotL)
n_ratio = N1 / N2
cos2 = Sqr(1 - (1 - cos1 * cos1) * n_ratio * n_ratio)
cos_factor = cos2 - cos1 * n_ratio
tx = -Lx * n_ratio - cos_factor * nx
ty = -Ly * n_ratio - cos_factor * ny
tz = -Lz * n_ratio - cos_factor * nz
Figure 17.25
Light traveling through a fiber optic cable.
< previous page
page_628
next page >